<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Template extends MX_Controller {
	 
	public function index($params = array())
	{
		$data['header'] = isset($params['header'])?$this->header($params['header']):$this->header();
		$data['content'] = $params['content'];
		$data['footer'] = isset($params['footer'])?$this->footer($params['footer']):$this->footer();
		$this->load->view('index',$data);
	}
	
	public function loginpage($params = array())
	{
		$data['header'] = $this->header($params['header']);
		$data['content'] = $params['content'];
		$data['footer'] = $this->footer($params['footer']);
		$this->load->view('loginpage',$data);
	}
	
	public function errorpage($params = array())
	{
		$data['header'] = isset($params['header'])?$this->header($params['header']):$this->header();
		$data['content'] = $params['content'];
		$data['footer'] = isset($params['footer'])?$this->footer($params['footer']):$this->footer();
		$this->load->view('errorpage',$data);
	}
	
	public function header($params = array())
	{
		$header = $this->load->view('header',$params,TRUE);
		
		return $header;
	}
	
	public function footer($params = array())
	{
		$footer = $this->load->view('footer',$params,TRUE);
		
		return $footer;
	}
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */